From b7630c6aab52b171cb351bcace9d14d669515f42 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 8 Mar 2005 17:11:49 +0000 Subject: [PATCH] bitkeeper revision 1.1159.258.27 (422ddcd5Cf-97FdGP6TJyFvIxer4Mg) Prevent buddy-allocator merges across Xen/Domain zones boundary. Signed-off-by: Keir Fraser --- xen/common/page_alloc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 1790e3520d..d8ac2d4ca0 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -392,6 +392,13 @@ void init_xenheap_pages(unsigned long ps, unsigned long pe) memguard_guard_range(__va(ps), pe - ps); + /* + * Yuk! Ensure there is a one-page buffer between Xen and Dom zones, to + * prevent merging of power-of-two blocks across the zone boundary. + */ + if ( !IS_XEN_HEAP_FRAME(phys_to_page(pe)) ) + pe -= PAGE_SIZE; + local_irq_save(flags); init_heap_pages(MEMZONE_XEN, phys_to_page(ps), (pe - ps) >> PAGE_SHIFT); local_irq_restore(flags); -- 2.30.2